<?php
/**
 * Created by PhpStorm.
 * User: zjw
 * Date: 2018/5/22
 * Time: 下午5:00
 */

namespace api\modules\v1\controllers;

use common\service\ServiceFactory;

class CouponController extends RestController
{
    public $modelClass = "common\models\Coupon";
    public function actionCreate()
    {

        try {
            $data = ServiceFactory::getInstance()->getCouponService()->getCouponByPromotion();
            return $data;


        } catch (\Exception $e) {
            return ['code' => -99, 'message' => $e->getMessage()];
        }

    }

}
